import Vue from "vue"
import VueRouter from "vue-router"
import  VueResource  from 'vue-resource'

Vue.use(VueResource) 
import {Header, Swipe, SwipeItem, Toast} from 'mint-ui'
import "./MUI/css/mui.min.css"
import "./MUI/css/icons-extra.css"
Vue.component(Header.name, Header);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Toast.name, Toast);

import app from './App.vue'

import Home from "./components/Home.vue"
import Member from "./components/Member.vue"
import Cart from "./components/Cart.vue"
import Search from "./components/Search.vue"

import NewList from "./components/subCom/NewList.vue"
import NewInfo from "./components/subCom/NewInfo.vue"
import imageInfo from "./components/subCom/imageInfo.vue"
import imageDetail from "./components/subCom/imageDetail.vue"

Vue.use(VueRouter)
const router = new VueRouter({
    routes:[
        { path: "/", redirect: "/Home" },
        { path: "/Home", component: Home },
        { path: "/Home/NewList", component: NewList },
        { path: "/Home/NewInfo/:id", component: NewInfo },
        { path: "/Home/imageInfo", component: imageInfo },
        { path: "/Home/imageDetail/:id", component: imageDetail },
        { path: "/Member", component: Member},
        { path: "/Cart", component: Cart },
        { path: "/Search", component: Search },
    ],
    linkActiveClass: "mui-active"
})

const vm = new Vue({
    el: "#app",
    router,
    data: function () {
        return {

        }
    },
    render: c => c(app),
    
})